import React, { Component } from 'react';

import { Toast , Modal } from 'antd-mobile'

class Chat extends Component {
  state = {  }
  render() { 
    Toast.info('XXXX')
    return ( <div onClick={this.clickDiv}>chat</div> );
  }
  clickDiv = ()=>{
    Modal.alert('警告框', '确定操作？', [
      { text: '关闭', onPress: () => {console.log("关闭")}},
      { text: '确认', onPress: () => {console.log("确认")}},
      // { text: '想想', onPress: () => console.log('想想') },
    ]);
  }
}
 
export default Chat;

// 使用react cra 脚手架新创建的项目，安装ant-design-mobile，使用modal。点击除 关闭 和 确认 按钮外的任意地方，都报下面的错误，是配置问题吗？
//  react-dom.development.js:1575 [Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080